<template>
  <div class="login-layout">
    <div v-if="config.itemType === 'AI实训平台'" class="brand"></div>
    <div v-else class="brand-ai"></div>
    <div class="main">
      <slot name="page"></slot>
    </div>
  </div>
</template>

<script setup lang="ts">
  import { useConfigStore } from '@/store/config'

  const config = useConfigStore()
</script>

<style lang="less" scoped>
  .login-layout {
    display: flex;
    width: 100vw;
    min-width: @min-width;
    height: 100vh;

    /* 区分AI中台和实训平台 */
    .brand {
      width: 504px;
      height: 100%;
      background: url('@/assets/img/login/side.jpg');
      background-position: left;
      background-repeat: no-repeat;
      background-size: cover;
    }

    .brand-ai {
      width: 504px;
      height: 100%;
      background: url('@/assets/img/login/side-ai.jpg');
      background-position: left;
      background-repeat: no-repeat;
      background-size: cover;
    }

    .main {
      flex: 1;
    }
  }
</style>
